package com.spzx.product.api;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.spzx.common.core.constant.ServiceNameConstants;
import com.spzx.common.core.domain.R;
import com.spzx.common.core.web.domain.AjaxResult;
import com.spzx.product.api.domain.Brand;
import com.spzx.product.api.domain.ProductSku;
import com.spzx.product.api.domain.query.ProductSkuQuery;
import com.spzx.product.api.factory.RemoteBrandFallbackFactory;
import com.spzx.product.api.factory.RemoteProductFallbackFactory;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

@FeignClient(contextId = "remoteBrandService"
        ,value = ServiceNameConstants.PRODUCT_SERVICE //注册中心的服务名
        , fallbackFactory = RemoteBrandFallbackFactory.class //降级工厂
    )
public interface RemoteBrandService {

    @Operation(summary = "内部调用接口：查询所有品牌")
    @GetMapping("brand/listAllBrands")
    public  R<List<Brand>> listAllBrands();
}
